home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3330 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.0 KB

  1. Path: freenet3.freenet.ufl.edu!afn03257
  2. From: afn03257@freenet3.freenet.ufl.edu (Daniel P Hudson)
  3. Newsgroups: comp.lang.c,comp.lang.c++,alt.msdos.programmer
  4. Subject: Re: Clearing the keyboard buffer
  5. Date: 23 Jan 1996 12:37:46 GMT
  6. Message-ID: <4e2kqq$eme@huron.eel.ufl.edu>
  7. References: <4dtqi4$60u@cdc2.cdc.net>
  8.  <4e18m5$on1@gryphon.phoenix.net>
  9. NNTP-Posting-Host: freenet3.afn.org
  10. X-Newsreader: wsOMR/SOUP v1.00 [NR]
  11.  
  12. In article <4e18m5$on1@gryphon.phoenix.net>,
  13. brucew@phoenix.net (Bruce Wedding) wrote:
  14.  
  15.  >> I'm using Turbo C++ v. 3.1 and I need to be able to clear the keyboard
  16.  >> buffer.
  17.  
  18.  > I'll probably be flamed for mentioning this, but I'm going to anyway.
  19.  > This is not STANDARD, in fact according to the ANSI Standard, it
  20.  > results in undefined behavior.  That ought to satisfy the pedants.
  21.  
  22.  No, but I sure got it for mentioning it, earlier. 
  23.  Type A personalities, you know I hate em'. sheesh! 8-)
  24.  
  25.  > fflush(stdin); /* will flush the keyboard in Turbo C */
  26.  
  27.  It also works in QuickC, which is where I had looked it up.
  28.  
  29.